home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / os2 / grfcdemo / demo.@ / READ.ME < prev    next >
Encoding:
Text File  |  1994-01-14  |  68.8 KB  |  1,898 lines

  1.                     Scientific Endeavors Corporation
  2.                            508 N. Kentucky St.
  3.                            Kingston, TN 37763
  4.                          Sales: (800) 998-1571
  5.                       Tech Support: (615) 376-4146
  6.                           Fax: (615) 376-1571
  7.  
  8.  
  9. The GraphiC demo package contains both a DOS-based demo program and a
  10. Windows-based demo program.  Copy all files on all disks into a directory
  11. on your hard disk.
  12.  
  13.                                 DOS DEMO
  14.  
  15. Before running DEMO.EXE, you must run the program EQUIP. It asks questions
  16. about your equipment and makes a file called config.gpc for your monitor
  17. and a file called printer1.prn for your printer. The main program will use
  18. these files to adapt itself to your hardware. After running EQUIP, run
  19. DEMO.EXE to start the demo.
  20.  
  21.                               Windows DEMO
  22.  
  23. Choose Run from the Windows File menu and run GPCWDEMO.EXE to start the demo.
  24.  
  25.                             GraphiC Features
  26.  
  27. The demo provides a sample of some of the kinds of things that GraphiC can
  28. do. GraphiC produces publication-quality graphs and charts in monochrome,
  29. or in color on multi-pen plotters, color monitors and some printers. It
  30. includes the following features:
  31.  
  32. GraphiC has the capability of generating several types of plots:
  33.  
  34.  
  35.           linear x-y plots          log-log plots
  36.           contour plots             3-D curves
  37.           3-D surfaces              3-D bars
  38.           polar plots               bar charts
  39.           pie charts                Smith charts
  40.  
  41. 1. Linear and log plots
  42.  
  43.     All linear and log plots are self-scaling, but you may also specify 
  44.     your own scales.
  45.  
  46.     Linear plots and semi-log plots may have the linear axes positioned 
  47.     at zero or at the left edge of the x-axis.
  48.  
  49.     An additional y-axis, with a different scale may be positioned at 
  50.     the right end of the x-axis.
  51.  
  52.     Y-axis labels may be oriented either horizontally or vertically.
  53.  
  54.     Logarithmic axes need not start or end on even decade values.
  55.  
  56.     A windowing feature allows for cropping of a plot on a specified rectangular 
  57.     boundary. A second plot may be drawn in this region. Scaling and positioning 
  58.     of this second plot are automatic.
  59.  
  60.     Log plots can be produced with any specified base.
  61.  
  62. 2. Curves
  63.  
  64.     Curves may be drawn in any of nine line types and in any of 216 different 
  65.     colors.
  66.  
  67.     Thickening of any line may be specified. Ends of contiguous segments 
  68.     are squared, and intermediate intersections are mitered.
  69.  
  70.     Markers may be placed every N datum points. Sixteen symbol types are 
  71.     provided.
  72.  
  73.     Data may be represented by the points alone.
  74.  
  75.     X and/or Y error bars may be inserted.
  76.  
  77.     A legend-box facility is provided for the style choices. The line 
  78.     styles for the curves are automatically chosen from the sequence of 
  79.     styles in the legend box.
  80.  
  81. 3. Vectors
  82.  
  83.     Vectors may be drawn with several head styles on either or both ends.
  84.  
  85.     Provision is made for the plotting of vector fields.
  86.  
  87. 4. Smoothing
  88.  
  89.     Facilities are included for cubic spline smoothing of either two dimensional 
  90.     or three dimensional plots.
  91.  
  92.     An additional smoothing method using piecewise linear regression is 
  93.     provided for scattered data points.
  94.  
  95. 5. Panel filling
  96.  
  97.     Fast panel filling is provided for figures with any number of sides 
  98.     up to the limit of computer memory. Filling may be done with 16
  99.     geometric patterns, 16 gray shades or 216 colors. On devices that do
  100.     not support 256 colors GraphiC will use dither patterns.
  101.  
  102. 6. Contour plots
  103.  
  104.     Contour plots may have every nth curve labeled.
  105.  
  106.     The line style and color may be specified for each level.
  107.  
  108.     The regions between contour levels can be filled with any of GraphiC's
  109.     panel filling patterns.
  110.  
  111.     Polar contour plots may be created.
  112.  
  113. 7. 3-D Surfaces
  114.  
  115.     3-D surfaces have optional hidden line removal.
  116.  
  117.     Either or both top and bottom sides may be shown.
  118.  
  119.     The two sides may be drawn in different colors.
  120.  
  121.     Mesh cells may be color coded according to the value of the height 
  122.     variable and they may be filled with any of the usual pattern choices, 
  123.     also coded according to height.
  124.  
  125.     2-D plots may be superimposed on a 3-D plot. They may be positioned 
  126.     anywhere in the x-y, x-z, or y,z planes. With this facility, a contour 
  127.     plot can be displayed along with the corresponding 3-D surface, or 
  128.     individual contours may be positioned on the 3-D surface at the proper 
  129.     height.
  130.  
  131.     Vertical bars may be drawn in place of the wire-mesh pattern.
  132.  
  133. Both contour plots and 3-D surfaces may be made from data scattered randomly
  134. in the x-y plane. An interpolation algorithm along with cubic spline smoothing
  135. is used to get values on a regularly spaced grid.
  136.  
  137. 8. Polar plots
  138.  
  139.     Polar plots have user-specified circular grid lines with string labels. 
  140.     Labels are positioned below the zero radial line. 
  141.  
  142.     Radial lines are at user controlled degree intervals.
  143.  
  144. 9. Bar charts
  145.  
  146.     Bar charts may have stacked bars or the bars may be displaced horizontally, 
  147.     with the second of a pair of bars partially hidden by the first.
  148.      
  149.     Bars may be filled with a set of special patterns or the standard
  150.     fill patterns and colors.
  151.  
  152.     String labels may be used.
  153.  
  154. 10. Pie charts
  155.  
  156.     Pie charts have automatically positioned legends.
  157.  
  158.     Individual slices may be filled with the standard selection of colors 
  159.     and patterns, and they may be pulled out radially.
  160.  
  161. 11. Smith charts
  162.  
  163.     The Smith chart is highly detailed. Provision is made for plotting 
  164.     impedance points and reflection coefficients and for drawing lines 
  165.     at a constant reflection coefficient.
  166.  
  167. 12. Wedge plots
  168.  
  169.     Wedge plots can be created.
  170.  
  171. 13. Fonts
  172.  
  173.     A selection of high-resolution, proportionally spaced fonts is provided 
  174.     including a large number of filled fonts.
  175.  
  176.     As many as four fonts can be active at any time and they can be intermixed 
  177.     as desired.
  178.  
  179.     You may control the height, character-spacing and line-spacing.
  180.  
  181.     Unlimited levels of super- and subscripts are supported, with a user-
  182.     adjustable size reduction and shift ratio.
  183.  
  184.     Plots containing only text are easily made.
  185.  
  186.     Letters may be widened, skewed, emboldened or colored.
  187.  
  188.     The filled letter fonts can be drawn with the filling option turned 
  189.     off to provide outline fonts.
  190.  
  191. 14. Cross hairs
  192.  
  193.     Cross hairs may be displayed and positioned with a mouse or the arrow 
  194.     keys. We support both the Logitech and Microsoft mice.
  195.  
  196.     The current position is printed at the left edge of the screen either 
  197.     in pixels or the units of your plot.
  198.  
  199.     Values at selected points may be saved in global arrays.
  200.  
  201.     The cursor may be used to draw or erase lines on the screen.
  202.  
  203.     The cross hairs also are used with the zoom feature (See below).
  204.  
  205. 15. Output files
  206.  
  207.     Output is written to a disk file in Tektronix .TKF format. It also 
  208.     may be viewed on the screen as it is being generated. The stored
  209.     resolution is 4096 X 3120.
  210.  
  211.     In "large mode" you can interact directly with the stored file to 
  212.     zoom, print or plot it.
  213.  
  214.     A facility called PLAY.EXE allows replay of a .TKF file at any later 
  215.     time for zooming, printing and plotting.
  216.  
  217.     An insert mode  allows a previously stored plot to be inserted in 
  218.     a window of another plot.
  219.  
  220.     The zoom mode uses the cursor to select a region of the picture to 
  221.     be enlarged. In a second mode, the cursor specifes a region into which 
  222.     the picture is to be compressed.
  223.  
  224.     PostScript, Digital Research .GEM, HPGL, and Lotus .PIC files can be
  225.     created.
  226.  
  227. 16. Printers and plotters
  228.  
  229.     A large selection of printers and plotters is supported, including 
  230.     several printers with multi-colored ribbons, the HP and Cannon laser 
  231.     printers the HP ThinkJet and the HP PaintJet. Several plotters types 
  232.     are supported including the HPGL series.
  233.  
  234.     For most printers, two resolutions are provided: a coarse plot for 
  235.     a quick dump during development and a high resolution plot using the 
  236.     intrinsic 4096 x 3120 data scaled to the printer's highest resolution.
  237.  
  238.     Two sizes and/or orientations of the output picture may be chosen.
  239.  
  240. 17. Zooming
  241.     A mouse-directed or arrow-key-directed cursor selects the region to fill
  242.     the screen when zooming. If demagnification is specified the entire
  243.     picture is shrunk into the designated area. If the cursor ticks are
  244.     positioned nearly horizontally the picture aspect ratio remains the same.
  245.     If they are positioned diagonally, different scale factors are called for
  246.     in the horizontal and vertical directions.
  247.  
  248. CLRTEST.C and SAMPLE.C are sample source programs illustrating some of the kinds
  249. of GraphiC functions and their use in generating displays.
  250.  
  251. If you want to use a plotter, run penset to select the pen colors. For Hewlett
  252. Packard plotters use 8 data bits and 1 stop bit.
  253.  
  254. The following is a complete list of the GraphiC routines and a brief
  255. description of their function.
  256.  
  257.                ***** INITIALIZATION ROUTINES *****
  258.  
  259. ******************************************************************
  260. bgnplot(monitor, screentype, filename)
  261.  
  262. bgnplot() opens an output file to receive the Tektronix formatted data,
  263. initializes the defaults for many parameters, and loads the video driver.
  264.  
  265. ******************************************************************
  266. GPC_MAIN()
  267.  
  268. GPC_MAIN() is a macro that you should use in place of the usual main() C
  269. function to provide compatibility between GraphiC for DOS anf GraphiC/WIN.
  270.  
  271. ******************************************************************
  272. startplot(color)
  273.  
  274. startplot() initializes each screen of plots, switches to graphics mode,
  275. sets the background color, and puts the information necessary to
  276. initialize the plot on re-play into the TKF file.
  277.  
  278.         ***** ACCESSING TEXT MODE AFTER GRAPHIC STARTS *****
  279.  
  280. After GraphiC is initiated via a call to bgnplot(), GraphiC expects all
  281. screen output to be in a graphical form. However, you might also want to
  282. display numbers or other text-mode items as your program calculates.
  283. GraphiC has two different methods of doing this depending upon whether
  284. you are in a DOS or in a windowed environment.
  285.  
  286. ******************************************************************
  287. gpcTextMode(on_off)
  288.  
  289. GPCTextMode() is a macro that behaves somewhat differently in
  290. DOS and windowing environments.
  291.  
  292. In non-windowed environments gpcTextMode() allows
  293. you to return to text mode after GraphiC has been initiated by a call
  294. to bgnplot(). GraphiC must be returned to graphics mode before
  295. any graphics are produced, and before the call to endplot().
  296. It is quite important that you return to graphics mode when graphics
  297. are produced or your program may hang up. Also, the graphics screen
  298. will not be restored, so it is best to arrange for your text-mode
  299. output to occur before the call to startplot() or after the
  300. call to endplot() in a multi-plot program. Text should be output
  301. using GPC_PUTS() for compatibility across platforms.
  302.  
  303. In windowing environments, you can have GraphiC display
  304. a second window which will scroll all text that is output by GPC_PUTS()
  305. (see page L-). The window can accept text at any
  306. time, and remains active (although hidden) if on_off = 0.
  307.  
  308.                ***** PLOT TERMINATION ROUTINES *****
  309.  
  310. ******************************************************************
  311. dateit(font)
  312.  
  313. dateit() puts the date and time along the top edge of your current plot.
  314.  
  315. ******************************************************************
  316. endplot(void)
  317.  
  318. endplot() is called after each screen of plots is completed. It writes
  319. into the TKF file all of the remaining data for the plot and returns
  320. GraphiC to Level 1 and waits for instructions from the user. endplot()
  321. resets the page rotation to its upright position.
  322.  
  323. You can avoid the wait for user input by using hardcopy('\n')
  324.  
  325. ******************************************************************
  326. plotadd(void)
  327.  
  328. A call to plotadd() after endplot() will redraw the previous plot and
  329. allow additional plotting to be added to the picture. When the additions
  330. are complete you must terminate the plot with another call to endplot().
  331.  
  332. ******************************************************************
  333. stopplot(void)
  334.  
  335. stopplot() is called at the very end of the plotting session. It empties
  336. the buffers and closes the plot files. It returns the screen to text mode
  337. and GraphiC to Level 0.
  338.  
  339.                ***** PAGE AND AXIS OPTIONS *****
  340.  
  341. ******************************************************************
  342. acrop(mode)
  343.  
  344. The default is to crop the lines at the edges of the plot region. To turn
  345. off this feature call acrop(1). This call automatically moves the cropping
  346. to the edge of the drawing page. The cropping is automatically reset to
  347. the default value after each call to curve drawing routines.
  348.  
  349. ******************************************************************
  350. area2d(xinch, yinch)
  351.  
  352. area2d() defines the lengths of the x and y axes.
  353.  
  354. ******************************************************************
  355. autolegend(on_off)
  356.  
  357. The legend feature automatically changes the line styles and colors
  358. of your curves when using curve().
  359.  
  360. ******************************************************************
  361. axesoff(noaxes)
  362.  
  363. axesoff() allows you to draw plots with no axes or axis labels.
  364.  
  365. ******************************************************************
  366. axnamht(inch)
  367.  
  368. axnamht() sets the height of the axis names for both axes. You can set
  369. them separately by calling xnamht() or ynamht().
  370.  
  371. ******************************************************************
  372. box()
  373.  
  374. box() draws a box around the area defined by the call to page().
  375.  
  376. ******************************************************************
  377. cross(iscross)
  378.  
  379. cross() makes the axes cross if either axis goes through zero.
  380.  
  381. ******************************************************************
  382. CrossAt(x, y)
  383.  
  384. CrossAt() allows you to specify the location along the axes where they
  385. will meet.
  386.  
  387. ******************************************************************
  388. fgrid(lnstyle, ndiv)
  389.  
  390. fgrid() allows you to draw one or more grid lines between adjacent
  391. axis tick marks.
  392.  
  393. ******************************************************************
  394. frame(frameon, ftick)
  395.  
  396. frame() allows you to put a box around the axis area.
  397.  
  398. ******************************************************************
  399. grid(lnstyle)
  400.  
  401. grid() draws lines through the tick marks using the line style of your
  402. choice.
  403.  
  404. ******************************************************************
  405. gwindow(x0, y0, x1, y1)
  406.  
  407. gwindow() causes the defined rectangle to stay clear while a picture is
  408. being drawn. After the first picture is completed, GraphiC will draw the
  409. next picture scaled to fit the window.
  410.  
  411. GraphiC supports any number of windows, all active at one time. Included
  412. in these active windows are legends and string labels plotted with the
  413. putlabel() function. The legend uses one window and each call to
  414. putlabel() uses one window. All window information is contained in
  415. dynamically allocated structures. Each window uses 40 bytes of memory.
  416.  
  417. ******************************************************************
  418. legend(marker, string, style, strhgt, scolor)
  419.  
  420. legend() allows you to define a legend entry. This routine must be used in
  421. conjunction with legpos().
  422.  
  423. ******************************************************************
  424. legpos(entries, xleg, yleg, border)
  425.  
  426. legpos() sets the position of the legend and allocates memory for the
  427. number of entries specified.
  428.  
  429. ******************************************************************
  430. metricunits(on_off)
  431.  
  432. metricunits() allows you to specify whether GraphiC works in inch units or
  433. metric units.
  434.  
  435. ******************************************************************
  436. numht(inch)
  437.  
  438. numht() sets the size of the tick mark labels.
  439.  
  440. ******************************************************************
  441. orel(xorel, yorel)
  442.  
  443. Use orel() to shift the plot origin relative to the previous plot.
  444.  
  445. ******************************************************************
  446. page(width, height)
  447.  
  448. page() sets the size of the picture on the output page. The maximum size
  449. of the output page can be set using PlotLength() or PixPerUnit().
  450. Otherwise, the maximum picture size is 9.00" - 6.884" (unrotated) or
  451. 6.884" - 9.00" (rotated), corresponding to the size of the default output
  452. page. If you call page(FULLPAGE), the macro FULLPAGE will ensure that your
  453. picture area will be the same as that of the drawing page.
  454.  
  455. ******************************************************************
  456. pbox(void)
  457.  
  458. pbox() draws a box around the edges of the output page.
  459.  
  460. ******************************************************************
  461. pgshift(xshift, yshift)
  462.  
  463. pgshift() allows you to specify the lower left corner of the drawing area
  464. page with respect to the output page.
  465.  
  466. ******************************************************************
  467. physor(xphysor, yphysor)
  468.  
  469. physor() allows you to specify the location of the physical origon of the
  470. plot area within the page.
  471.  
  472. ******************************************************************
  473. rightax(yright)
  474.  
  475. rightax() is a parameter setting routine that will cause GraphiC
  476. to draw a right-hand y axis.
  477.  
  478. ******************************************************************
  479. PlotLength(length)
  480. PixPerUnit(pixels)
  481.  
  482. Since GraphiC supports variable output page sizes, GraphiC needs to
  483. know how to map the internal pixel coordinate system to your output
  484. device. You are free to specify this scaling, but we recommend that
  485. it match the plot length of an L printer dump that you specified
  486. when you set up your printer for use with GraphiC. If you make any
  487. other choice, the sizes on your printer output will not match the
  488. specifications in your program.
  489.  
  490. This function must be called before page() or the scaling will
  491. not be correct.
  492.  
  493. ******************************************************************
  494. plotabsolute(absolute_flag)
  495.  
  496. By default GraphiC will not let the axes lengths to be bigger than the
  497. page specifications. plotabsolute() over rides this feature.
  498.  
  499. ******************************************************************
  500. rotate(isrot)
  501.  
  502. rotate() rotates the page 90 degrees (clockwise).
  503.  
  504. ******************************************************************
  505. tickht(height)
  506.  
  507. tickht() gives you full control over the appearance of tick marks on all
  508. plots.
  509.  
  510. ******************************************************************
  511. titlht(inch)
  512.  
  513. titlht() allows you to specify the height of the plot title.
  514.  
  515. ******************************************************************
  516. upright(uplab)
  517.  
  518. When upright(1) is called, a flag is set that causes the y
  519. axis labels to be plotted horizontally.
  520.  
  521. ******************************************************************
  522. xfgrid(lnstyle, nxdiv)
  523.  
  524. xfgrid() allows you to subdivide the x axis with grid lines or tick marks
  525. between major x axis dividions.
  526.  
  527. ******************************************************************
  528. xgrid(isgrid)
  529.  
  530. xgrid() draws lines through the x axis tick marks.
  531.  
  532. ******************************************************************
  533. xlab(on_off, labstr)
  534.  
  535. xlab() turns on or off the x axis string label option. When it is on, each
  536. string is positioned at a tick mark  in the same way as numerical labels.
  537.  
  538. ******************************************************************
  539. xLabAng(angle)
  540. yLabAng(angle)
  541. zLabAng(angle)
  542.  
  543. These routines allow you to specify the angle that will be used to plot
  544. the axes tick labels.
  545.  
  546. ******************************************************************
  547. xnamht(inch)
  548. ynamht(inch)
  549.  
  550. These routines allow you to specify the height of the axes names.
  551.  
  552. ******************************************************************
  553. yfgrid(lnstyle, nydiv)
  554.  
  555. yfgrid() allows you to subdivide the y axis with grid lines or tick marks
  556. between major y axis dividions.
  557.  
  558. ******************************************************************
  559. ygrid(isgrid)
  560.  
  561. ygrid() draws lines through the y axis tick marks.
  562.  
  563. ******************************************************************
  564. ylab(on_off, labstr)
  565.  
  566. ylab() turns on or off the y axis string label option. When it is on, each
  567. string is positioned at a tick mark in the same way as numerical labels.
  568.  
  569.                ***** Simultaneous Plots *****
  570.  
  571. GraphiC provides facilities for ploting points simultaneously on many
  572. axes so that you can view several aspects of a calculation or data input
  573. at the same time.
  574.  
  575. ******************************************************************
  576. context(plot_number)
  577.  
  578. Call context() to change the active page and/or axes region when plotting.
  579.  
  580. ******************************************************************
  581. simuplot(numplots)
  582.  
  583. simuplot() allocates data structures for the number of plots specified.
  584.  
  585.                 ***** 2-D Axes Routines *****
  586.  
  587. GraphiC provides two types of axis routines, user-scaled and auto-scaled.
  588.  
  589. LINEAR AXES:
  590.  
  591. ******************************************************************
  592. graf(xformat, xori, xste, xmax, yformat, yori, yste, ymax)
  593.  
  594. graf() is the primary axis setup routine for x-y plots. The scaling will
  595. fixed according to the input parameters (user-scaled).
  596.  
  597. ******************************************************************
  598. scales(nxdiv, nydiv, x, y, npts)
  599.  
  600. scales() is the self-scaling routine for linear plots. It calculates the
  601. maximum and minimum values of x and y, and chooses the appropriate set of
  602. round numbers to use as axis labels and then calls graf().
  603.  
  604. LOGARITHMIC AXES:
  605.  
  606. ******************************************************************
  607. lglgscle(x, y, npts)
  608.  
  609. lglgscle() produces self-scaling log-log plots.
  610.  
  611. ******************************************************************
  612. loglog(xori, xmax, yori, ymax)
  613.  
  614. loglog() is used to make user-scaled log-log plots.
  615.  
  616. ******************************************************************
  617. SetLogBase(base_x, base_y)
  618.  
  619. SetLogBase() allows you to set the log base for the axes in a log plot.
  620. The default is base 10. You can use the character 'e' or 'E' to set the
  621. base to the natural logarithm.
  622.  
  623. ******************************************************************
  624. xlgscle(nydiv, x, y, npts)
  625.  
  626. The self-scaling axis routine xlgscle(), finds the correct number of
  627. decades so that the logarithmic x axis can accommodate the data. Labels on
  628. log axes are always placed at the decade markings. Intermediate points are
  629. labeled depending on the spacing between divisions. The y axis is linear.
  630.  
  631. ******************************************************************
  632. ylgscle(nxdiv, x, y, npts)
  633.  
  634. The self-scaling axis routine ylgscle(), finds the correct number of
  635. decades so that the logarithmic y axis can accommodate the data. Labels on
  636. log axes are always placed at the decade markings. Intermediate points are
  637. labeled depending on the spacing between divisions. The x axis is linear.
  638.  
  639. ******************************************************************
  640. xlog(xori, xmax, yformat, yori, yste, ymax)
  641.  
  642. xlog() is a user-scaled routine for drawing an x log axis with a linear y
  643. axis.
  644.  
  645. ******************************************************************
  646. ylog(xformat, xori, xste, xmax, yori, ymax)
  647.  
  648. ylog() is a user-scaled routine for drawing an y log axis with a linear x
  649. axis.
  650.  
  651. LABELING ROUTINES:
  652.  
  653. ******************************************************************
  654. heading(title)
  655.  
  656. heading() sets the program up so that when the axes drawing routine is
  657. called the plot will be titled.
  658.  
  659. ******************************************************************
  660. xname(xlabel)
  661.  
  662. xname() sets the program up so that when the axes drawing routine is
  663. called the x axis will have a name.
  664.  
  665. ******************************************************************
  666. yname(ylabel)
  667.  
  668. yname() sets the program up so that when the axes drawing routine is
  669. called the y axis will have a name.
  670.  
  671. LINEAR FUNCTIONS:
  672.  
  673. ******************************************************************
  674. bar(nxdiv, x, y, npts, bwid, mode, carray, typearray)
  675.  
  676. bar() draws a bar chart. Bars are centered on the x datum values. They may
  677. be based on the lower edge of the grid space or on the y = 0 line.
  678. Segmented bars, showing the addition of several components, or offset bars
  679. can be made by using repeated x[] values. In these cases, npts is greater
  680. than nxdiv; otherwise these two arguments should be equal. To prevent the
  681. bars from being drawn on the axes and overhanging the end of the axes, be
  682. sure that the first value in the x array is not the same as the x origin,
  683. and in the call to graf(), make xmax one x interval greater than the
  684. actual maximum x value.
  685.  
  686. ******************************************************************
  687. curve(x, y, npts, sym)
  688.  
  689. Each time curve() is called, a curve is drawn on the plot in the current
  690. color. Sixteen different symbols can be used as curve markers, and nine
  691. different line styles are available. The line and symbol styles can be
  692. changed automatically by using the legend feature or manually by calling
  693. the appropriate routine. curve() is used for any of the linear or
  694. logarithmic plots.
  695.  
  696. Scatter plots may be drawn by calling scatplot() with a 1 before calling
  697. curve(). You can still draw symbols every sym points.
  698.  
  699. ******************************************************************
  700. curvfill(x, y, npts, x1, y1, npts1, pcolor, curves)
  701.  
  702. curvfill() will fill the area between two curves with the desired
  703. solid color or pattern.
  704.  
  705. ******************************************************************
  706. errorbar(x, xmin, xmax, y, ymin, ymax)
  707.  
  708. Using errorbar(), a user can plot an error bar at any point on the curve.
  709. Different line styles are available for the bars by calling dashf().
  710.  
  711. ******************************************************************
  712. histogram(x, y, npts, type, colors)
  713.  
  714. A histogram is similar to a bar chart, except that in a histogram, the
  715. right edges of the bars fall on data values.
  716.  
  717. ******************************************************************
  718. scatplot(dot)
  719.  
  720. For drawing scatter plots, scatplot() sets a flag that causes
  721. curve() to draw points only. If the last argument to curve()
  722. is a 0, curve() will draw a dot at every point. Otherwise curve()
  723. will behave normally.
  724.  
  725. ******************************************************************
  726. staircase(x, y, xnew, ynew, npts, mode)
  727.  
  728. This function transforms the input vectors into a "staircase" set of
  729. output vectors. The y value is held constant between x data points and
  730. jumps vertically between levels. The jump points are determined by the
  731. variable mode. The effect is as if a bar plot were drawn with touching
  732. bars, and the staircase is the curve of the bar tops.
  733.  
  734.                    ***** Smith Charts *****
  735.  
  736. ******************************************************************
  737. getrho(&rho, &theta)
  738.  
  739. getrho() returns the reflection coefficient and the angle at the current
  740. position on the Smith chart. The position is determined by a plot??() call
  741. or by a smove() call.
  742.  
  743. ******************************************************************
  744. getrx(&R, &X)
  745.  
  746. getrx() returns the resistance and reactance at the current position on
  747. the Smith chart. The position is determined by a plot??() call or by a
  748. smove() call.
  749.  
  750. ******************************************************************
  751. plotrho(rho, theta)
  752.  
  753. plotrho() puts a point on the Smith chart corresponding to the value of
  754. the reflection coefficient.
  755.  
  756. ******************************************************************
  757. smdraw(lcolor)
  758.  
  759. Draws a Smith chart type of grid. Lengths normalized to the characteristic
  760. impedance should be used in the functions that put points and lines on the
  761. grid.
  762.  
  763. ******************************************************************
  764. plotrx(R, X)
  765.  
  766. plotrx() puts a point on the Smith chart corresponding to the impedance
  767. looking into the line at a point on the line, or at the load.
  768.  
  769. ******************************************************************
  770. smithcir(u, v, radius)
  771.  
  772. smithcir() draws a circle on a Smith chart.
  773.  
  774. ******************************************************************
  775. smove(del)
  776.  
  777. smove() draws a line on a Smith chart at constant rho from the present
  778. position (determined by plotrx() or plotrho()).
  779.  
  780.                   ***** Polar Plots *****
  781.  
  782. ******************************************************************
  783. polar(mode)
  784.  
  785. polar() allows you to make polar contour plots.
  786.  
  787. ******************************************************************
  788. polcurve(r, theta, dim, sym)
  789.  
  790. polcurve() draws a curve corresponding to the vector r, on a polar grid.
  791. If r is logarithmic, the previous call to polgrid() will provide cropping
  792. for the curve at the minimum circle.
  793.  
  794. ******************************************************************
  795. polgrid(rmax, rmin, mode, larray, dim, ntheta, col)
  796.  
  797. polgrid() draws a polar grid.
  798.  
  799. ******************************************************************
  800. wedge(rmin, rmax, thmin, thmax, pattern, border)
  801.  
  802. wedge() draws a wedge-shaped region on a polar coordinate plot and fills
  803. it. Unlike a pie slice, the inner tip of the wedge only goes to rmin
  804. instead of 0.
  805.  
  806.                     ***** Contour Plots *****
  807.  
  808. Contour plots can be drawn in conjunction with 3-D plots by following the
  809. instructions given under plane3d().
  810.  
  811. In addition to drawing a contour plot in a plane of the 3-D workbox, you
  812. can draw contour plots as elevated or stacked contours. This can be done
  813. by establishing a 3-D workbox, calling plane3d(), and calling stack(1).
  814. This feature can be used to superimpose a contour plot on a 3-D surface.
  815. Stacked contours do not have hidden line removal activated.
  816.  
  817. GraphiC can also be used to create triangle plots. Triangle plots are a
  818. special kind of contour plot. They provide for the graphic display of an
  819. attribute of a three-component mixture. Each component is associated with
  820. a vertex. The fraction of that component is plotted on a line parallel to
  821. the opposite side. The position of the line is proportionally closer to
  822. the vertex depending on the relative amount of the component. Any two
  823. components determine the position of a point. GraphiC draws constant-value
  824. contours of the attribute.
  825.  
  826. The user has two options for triangle plots. You can specify a functional
  827. relationship between the attribute and two of the parameters or you can
  828. provide a table of values. The contours cannot be labeled automatically
  829. because of the mapping scheme used to generate them. They can, however,
  830. have different colors and/or line styles, which can be displayed and
  831. identified in a legend box.
  832.  
  833. Polar contour plots are created by setting up polar axes and making a call
  834. to polar() before your call to any contour-plotting routines. The x array
  835. in the contour plot corresponds to the radial direction in polar
  836. coordinates, and the y array corresponds to the angular direction in polar
  837. coordinates.
  838.  
  839. Setting z-values in a user-supplied matrix or in a function
  840. return value to a special value (called Not A Number, or NAN
  841. for short) will tell the contour plotter that data is missing, and
  842. contours will not be drawn through the cells so marked.
  843.  
  844. GraphiC allows you to define several types of NANs
  845. to allow you to represent data values that are missing,
  846. bad, or undefined. GraphiC ignores these values when doing contour
  847. plots and 3-D surface plots. As a result, your data can be defined
  848. on a non-rectangular domain.
  849.  
  850. ******************************************************************
  851. conmat(zmat, x, nx, y, ny, min, step, max, lnstyle, labint)
  852. conmat2(zmat, x, nx, y, ny, min, step, max, lnstyle, labint)
  853.  
  854. conmat() and conmat2() produce level contours for the array z[y][x]. That
  855. is, for each level C, the curve z[y][x] = C is plotted.
  856.  
  857. ******************************************************************
  858. conmatr(x, y, z, npts, xgmin, xgmax, nxpts, ygmin, ygmax, nypts, zorig,
  859. zstep, zmax, lnstyle, labint)
  860.  
  861. conmatr() produces a contour plot from irregularly spaced data points.
  862.  
  863. ******************************************************************
  864. contcolor(colors, bord, line_styles)
  865.  
  866. Use contcolor() to set the attributes of your contours.
  867.  
  868. ******************************************************************
  869. contour(fun, x, nx, y, ny, min, step, max, lnstyle, labint)
  870.  
  871. contour() produces level contours for the function fun(x,y). That is, for
  872. each value of level C, the curve fun(x,y) = C is plotted.
  873.  
  874. ******************************************************************
  875. GetContour(size, x, y, level)
  876.  
  877. GetContour() allows you to obtain the x, y coordinate pairs for any single
  878. contour in a contour plot.
  879.  
  880. ******************************************************************
  881. lconmat(zmat, x, nx, y, ny, level, lnstyle, nlevel, labint, format)
  882. lconmat2(zmat, x, nx, y, ny, level, lnstyle, nlevel, labint, format)
  883.  
  884. lconmat() and lconmat2() produces level contours for the array z[y][x].
  885. That is, for each level C, the curve z[y][x] = C is plotted.
  886.  
  887. ******************************************************************
  888. lcontour(fun, x, nx, y, ny, level, nlevel, lnstyle,labint, format)
  889.  
  890. lcontour() produces level contours for the function fun(x,y). That is, for
  891. each level C, the curve fun(x,y) = C is plotted.
  892.  
  893. ******************************************************************
  894. patchmat(*zmat, *x, nx, *y, ny, minv, maxv, type, *intensity, nintensity,
  895. border, legllx, leglly, legurx, legury, labint, *format, font, height,
  896. nsmear)
  897.  
  898. This routine makes a patch plot. Each cell in the grid is filled with a
  899. panel whose color is related to the values on the grid. There is an option
  900. that allows the user to make a "smeared" contour plot as well.
  901.  
  902. ******************************************************************
  903. stack(stacked)
  904.  
  905. Calling stack() with a 1 will allow you to superimpose a contour plot on a
  906. 3-D surface or create contour rings that are elevated.
  907.  
  908. TRIANGLE PLOTS:
  909.  
  910. ******************************************************************
  911. trifun(fun, dim, zmin, zstep, zmax, lnstyle, border)
  912.  
  913. trifun() draws a triangle plot based on data generated by the function
  914. fun().
  915.  
  916. ******************************************************************
  917. trimat(a, b, z, dim, ngrid, zmin, zstep, zmax, 
  918. lnstyle, border)
  919.  
  920. trimat() draws a triangle plot based on the input values a, b, z.
  921.  
  922. ******************************************************************
  923. aname(alabel)
  924.  
  925. aname() sets the name for the 'A' axis on a triangle plot.
  926.  
  927. ******************************************************************
  928. bname(blabel)
  929.  
  930. bname() sets the name for the 'B' axis on a triangle plot.
  931.  
  932. ******************************************************************
  933. cname(clabel)
  934.  
  935. cname() sets the name for the 'C' axis on a triangle plot.
  936.  
  937. ******************************************************************
  938. trinamht(inch)
  939.  
  940. trinamht() allows you to set the height of the axis-name labels on
  941. triangle plots.
  942.  
  943.               ***** Three-Dimensional Plots *****
  944.  
  945. ******************************************************************
  946. base(isbase, color)
  947.  
  948. A call to base() will cause a box to be drawn around the x-y plane at the
  949. base of the z axis, connected to the corners fo the 3-D surface.
  950.  
  951. ******************************************************************
  952. bcolor(value)
  953. tcolor(value)
  954.  
  955. bcolor() and tcolor() allow you to assign different colors
  956. to the top and bottom of a 3-D surface.
  957.  
  958. ******************************************************************
  959. box3d()
  960.  
  961. box3d() draws the 3-D workbox.
  962.  
  963. ******************************************************************
  964. curv3d(x, y, z, npts)
  965.  
  966. curv3d() plots parametric curves in three-dimensional space.
  967. There is no hidden line removal with curv3d().
  968.  
  969. ******************************************************************
  970. d3bars(barson)
  971.  
  972. Calling d3bars() with a positive real argument sets the 3-D bars mode.
  973. Bars are drawn instead of the default wire-mesh pattern when any of the
  974. surface plotting routines are called.
  975.  
  976. ******************************************************************
  977. d3color(array, nlevel, mesh)
  978.  
  979. d3color() causes a 3-D surface to be filled with the colors specified in
  980. array.
  981.  
  982. ******************************************************************
  983. d3head(title, place)
  984.  
  985. d3head() defines the plot title and it's location on a 3-D plot.
  986.  
  987. ******************************************************************
  988. d3line(xf, yf, zf, xt, yt, zt)
  989.  
  990. d3line() draws a line from (xf, yf, zf) as defined in user units.
  991.  
  992. ******************************************************************
  993. d3pltfnt(x, y, z, string, height, angle)
  994.  
  995. d3fntplt() plots a string at the location x, y, z in the plane of the
  996. paper.
  997.  
  998. ******************************************************************
  999. graf3d(xorig, xstep, xmax, yorig, ystep, ymax, zorig, zstep, zmax)
  1000.  
  1001. graf3d() determines the scaling and labeling of the axes.
  1002.  
  1003. ******************************************************************
  1004. nohide(visible)
  1005.  
  1006. nohide() disables hidden line removal.
  1007.  
  1008. ******************************************************************
  1009. panel3d(x, y, z, nsides, pattern, border)
  1010.  
  1011. The panel3d() function allows you to define a panel in 3-D space.
  1012.  
  1013. ******************************************************************
  1014. sclfix(isfixed)
  1015.  
  1016. sclfix() allows the user to draw several 3-D surfaces using the same
  1017. scaling.
  1018.  
  1019. ******************************************************************
  1020. surfun(zfun, ixpts, xdel, iypts, ydel)
  1021.  
  1022. surfun() draws the surface z = zfun(x, y) as a grid of lines parallel to
  1023. the x and y axes.
  1024.  
  1025. ******************************************************************
  1026. surmat(zmat, xdim, ydim)
  1027. surmat2(zmat, xdim, ydim)
  1028. surmatc(zmat, xdim, ydim, ixpts, iypts)
  1029. surmatc2(zmat, xdim, ydim, ixpts, iypts)
  1030.  
  1031. The surmat() family of functions draws a surface from a data matrix that
  1032. you supply.
  1033.  
  1034. ******************************************************************
  1035. surmatr(x, y, z, npts, xgmin, xgmax, nxpts, ygmin, ygmax, nypts)
  1036.  
  1037. surmatr() produces a 3-D surface from irregularly spaced data
  1038. points.
  1039.  
  1040. ******************************************************************
  1041. survis(which)
  1042.  
  1043. survis() allows you to specify which side(s) of a surface will be visible.
  1044.  
  1045. ******************************************************************
  1046. view(xvu, yvu, zvu)
  1047. vuabs(xvu, yvu, zvu)
  1048. vuangl(phi, theta, radius)
  1049.  
  1050. view(), vuabs() and vuangl() allow you to specify the position of the
  1051. 'eye' with respect to the 3-D workbox. The units are in plot, workbox or
  1052. angle/radius respectivly.
  1053.  
  1054. ******************************************************************
  1055. volm3d(xlength, ylength, zlength)
  1056.  
  1057. volm3d() determines the length/width/height ratios of the workbox.
  1058.  
  1059. ******************************************************************
  1060. x3name(xname)
  1061. y3name(yname)
  1062. z3name(zname)
  1063.  
  1064. These routines provide names for the 3-D axes.
  1065.  
  1066. 2-D PLOTS IN A 3-D PLANE:
  1067.  
  1068. The entire range of plotting functions is available to plot in a plane
  1069. defined by the calls to the 3-D plotting functions. Once the 3-D workbox
  1070. has been defined, you can use these functions to plot 2-D graphs,
  1071. lines, curves, or text in the plane you define. This feature allows
  1072. you to draw projections of a surface onto a wall of the workbox or
  1073. draw a contour plot that corresponds to the surface in the x-y
  1074. plane at any value of z etc.
  1075.  
  1076. ******************************************************************
  1077. d3grid(subdiv, toplab)
  1078.  
  1079. This routine can be used to grid a 3-D plot or establish a grid on
  1080. which to plot a projected curve.
  1081.  
  1082. ******************************************************************
  1083. plane3d(plane, position, hide)
  1084.  
  1085. After a call to plane3d() all line drawing will be scaled to
  1086. the 3-D workbox established by the most recent call to graf3d().
  1087.  
  1088.                      ***** Pie Charts *****
  1089.  
  1090. ******************************************************************
  1091. pieplot(nslices, seg, clr, offset, caption, size, border, txtclr)
  1092.  
  1093. This routine allows you to make pie charts with one or all the slices
  1094. offset from the center.
  1095.  
  1096.                 ***** Box and Whiskers Plots *****
  1097.  
  1098. BoxPlot(x, y, ydim, outlier, symnum, width)
  1099.  
  1100. BoxPlot() draws a box and whisker plot.
  1101.  
  1102.                  ***** Error Function Plots *****
  1103.  
  1104. The x axis of an error function (ERF) plot is scaled on
  1105. cumulative percentage. The y axis is scaled linearly. Results
  1106. for a normal distribution (bell curve) are expected to be a straight
  1107. line on the ERF grid.
  1108.  
  1109. ******************************************************************
  1110. erfcurve(x, y, npts, sym)
  1111.  
  1112. erfcurve() plots the x and y data on an ERF grid.
  1113.  
  1114. ******************************************************************
  1115. erfgrid(ymin, ystep, ymax, yformat)
  1116.  
  1117. erfgrid() draws the axes and grid lines that appear on ERF or "percent"
  1118. paper.
  1119.  
  1120. ******************************************************************
  1121. erfscales(nydiv,y, npts)
  1122.  
  1123. erfscales() routine is the self-scaling routine for ERF plots. It uses the
  1124. y data to calculate the y axis scaling parameters and then calls
  1125. erfgrid().
  1126.  
  1127.                ***** Line-Drawing Routines *****
  1128.  
  1129. ******************************************************************
  1130. ellipse(xc, yc, xr, yr, rotation, th1, th2, degrees, units)
  1131.  
  1132. ellipse() draws an ellipse segment in the specified units. If xr == yr a
  1133. circle will be drawn.
  1134.  
  1135. ******************************************************************
  1136. fillellipse(on_off, pattern, border, units)
  1137.  
  1138. If on_off = 1, all future circles and ellipses will be filled with the
  1139. specified pattern.
  1140.  
  1141. ******************************************************************
  1142. linch(xfinch, yfinch, xtinch, ytinch, newcurve)
  1143.  
  1144. linch() draws a line between two points whose coordinates are specified in
  1145. inches (or cm) with respect to the lower left corner of the drawing page.
  1146.  
  1147. ******************************************************************
  1148. line(xfrom, yfrom, xto, yto, newcurve)
  1149.  
  1150. Occasionally it is more convenient to draw a line directly on the graphic
  1151. bit map. line() draws a line between (xfrom, yfrom) and (xto, yto), with
  1152. the dimensions given as pixels on the 8192 - 6267 GraphiC pixel grid.
  1153.  
  1154. ******************************************************************
  1155. radlin(xpos, ypos, rad1, rad2, theta)
  1156.  
  1157. radlin() is used to draw a piece of a radial line in a circle.
  1158.  
  1159. ******************************************************************
  1160. uline(xfrom, yfrom, xto, yto, newcurve)
  1161.  
  1162. uline() is the same as line() except that all coordinates are scaled in
  1163. user units.
  1164.  
  1165. ******************************************************************
  1166. uradlin(xpos, ypos, rad1, rad2, theta)
  1167.  
  1168. uradlin() is the same as radline() except all coordinates are scaled in
  1169. user units.
  1170.  
  1171. ******************************************************************
  1172. uvector(xfrom, yfrom, xto, yto, ltow, size, "type")
  1173.  
  1174. uvector() is the same as vector() except that the ends are located in user
  1175. units.
  1176.  
  1177. ******************************************************************
  1178. vector(xfrom, yfrom, xto, yto, ltow, size, "type")
  1179.  
  1180. vector() draws an arrow from (xfrom,yfrom) to (xto,yto) with the
  1181. coordinates in inch units.
  1182.  
  1183.                  ***** Line and Symbol Styles *****
  1184.  
  1185. ******************************************************************
  1186. dashf(style)
  1187.  
  1188. dashf() sets the line style to one of the GraphiC line styles.
  1189.  
  1190. ******************************************************************
  1191. symbol(x, y, symnum)
  1192.  
  1193. symbol() plots a marker symbol centered at x,y. Units are in plot
  1194. coordinates.
  1195.  
  1196. ******************************************************************
  1197. syminch(x, y, symnum)
  1198.  
  1199. syminch() is like symbol() except that units are in inches.
  1200.  
  1201. ******************************************************************
  1202. symht(height)
  1203.  
  1204. symht() changes the size of the symbols used as curve markers.
  1205.  
  1206. ******************************************************************
  1207. sympick(symnum)
  1208.  
  1209. sympick() selects the symbol that will be used when curve() is used.
  1210.  
  1211. ******************************************************************
  1212. tcurve(width) or ticurve(width)
  1213.  
  1214. tcurve() causes curve to draw thick curves as specified by the size of
  1215. width. For tcurve() width is pixels and for ticurve() width is inches.
  1216.  
  1217. ******************************************************************
  1218. tline(width) or tiline(width)
  1219.  
  1220. tline() and tiline() set the line thickness for all lines. For tline()
  1221. width is pixels and for tiline() width is inches.
  1222.  
  1223.                          ***** Color *****
  1224.  
  1225. GraphiC supports three sets of colors:
  1226.  
  1227. IBM colors, 0 - 15.
  1228. Tektronix dithered colors, 50 - 174.
  1229. GraphiC RGB colors, 200 - 447.
  1230.  
  1231. The GraphiC RGB colors include the
  1232. standard IBM colors and a 16-level gray scale.
  1233.  
  1234. When output devices cannot support extended colors, GraphiC uses dither
  1235. patterns to approximate the color. In order to use dither patterns on
  1236. lines, the line width will be increased automatically by GraphiC.
  1237.  
  1238. There are many representations of color that are used for different
  1239. purposes. GraphiC uses the RGB (red, green, blue) system which is most
  1240. appropriate for video systems. GraphiC provides routines to convert colors
  1241. from one system to another, or for matching RGB values to the closest
  1242. GraphiC color.
  1243.  
  1244. ******************************************************************
  1245. color(value)
  1246.  
  1247. color() sets the line color to value.
  1248.  
  1249. ******************************************************************
  1250. GRCtoIBM(i, rgb, *IBMcolor)
  1251.  
  1252. This routine allows you to extract the RGB values from a GraphiC color
  1253. and to obtain the closest IBM color number.
  1254.  
  1255. ******************************************************************
  1256. HLStoRGB(h, l, s, r, g, b)
  1257.  
  1258. HLStoRGB() converts color representations in the HLS color system to the
  1259. RGB system.
  1260.  
  1261. penchg() does not exist in GraphiC/WIN. You control the behavior of the
  1262. output device through the Windows control panel.
  1263.  
  1264. ******************************************************************
  1265. RGBtoCMY(r, g, b, c, m, y)
  1266.  
  1267. This routine converts colors in the RGB representation to the CMY
  1268. representation.
  1269.  
  1270. ******************************************************************
  1271. RGBtoCMYK(r, g, b, c, m, y, k)
  1272.  
  1273. This routine converts colors in the RGB representation to the CMYK
  1274. representation that is usually used for four-color printing.
  1275.  
  1276. ******************************************************************
  1277. RGBtoGPC(r, g, b, IBMcolor)
  1278.  
  1279. This function returns the closest GraphiC RGB color value as well as the
  1280. closest IBM color.
  1281.  
  1282. ******************************************************************
  1283. RGBtoHLS(r, g, b, h, l, s)
  1284.  
  1285. RGBtoHLS() converts color representations in the RGB color system to the
  1286. HLS system.
  1287.  
  1288. ******************************************************************
  1289. RGBtoIBM(rgb)
  1290.  
  1291. This routine returns the closest IBM color to a given set of R, G, and B
  1292. values.
  1293.  
  1294. ******************************************************************
  1295. penchg(mode)
  1296.  
  1297. penchg() causes GraphiC to pause when printing to a single pen plotter
  1298. when there is a color change so that you may change the pen.
  1299.  
  1300.                      **** Text Routines ****
  1301.  
  1302. The same fonts that are used to label plots may be used to write legends
  1303. or to make text viewgraphs for presentations. A large selection of fonts
  1304. is available. Any four of them may be active at once. To use these fonts,
  1305. you should be aware of how the font routines are implemented.
  1306.  
  1307. Each font runs from ASCII character 32 (a space) through 199 (there is no
  1308. character 127). Each character is stored as a series of vectors so that it
  1309. may easily be changed in size or rotated. Characters may be plotted in any
  1310. height and at any angle in one-degree increments from the horizontal. They
  1311. may be skewed to the right or to the left, and their aspect ratio may be
  1312. changed. The thickness of the lines that make up the character may be
  1313. changed, as well as the color of the character. Strings also may be
  1314. plotted along an arc.
  1315.  
  1316. Tabs may be embedded into strings by using an ordinary tab character
  1317. (ASCII 9). The tabs are expanded into the number of spaces determined by
  1318. tabspace() and do not cause a jump to a particular column. Data and text
  1319. may be combined into a string by using the sprintf() C library routine.
  1320. The active fonts may be changed at any time by calling font(). A font
  1321. selection character must be used at the beginning of every string;
  1322. otherwise, the last active font will be used. Initially, the first font
  1323. listed in the call to font() will be active.
  1324.  
  1325. GraphiC supports unlimited levels of super- and subscripts in a manner
  1326. that is very easy to use. Each level of script is plotted in a smaller-sized
  1327. font. The size and offset may be controlled.
  1328.  
  1329. You can change the color within a string.
  1330.  
  1331. ******************************************************************
  1332. charspc(width)
  1333.  
  1334. charspc() allows you to set the spacing of the characters
  1335.  
  1336. ******************************************************************
  1337. circtxt(x, y, r, string, height, angle)
  1338.  
  1339. circtxt() plots a string along an arc.
  1340.  
  1341. ******************************************************************
  1342. ctline(string, height)
  1343.  
  1344. ctline() centers a line of text on the page between the left margin and
  1345. the right margin.
  1346.  
  1347. ******************************************************************
  1348. rtline(string, height)
  1349.  
  1350. rtline() puts a line of text on the page ending at the right margin.
  1351.  
  1352. ******************************************************************
  1353. ltline(string, height)
  1354.  
  1355. ltline() puts a line of text on the page beginning at the left margin.
  1356.  
  1357. ******************************************************************
  1358. fbox(boxon, size)
  1359.  
  1360. fbox() will put a box around each string until it is turned
  1361. off. This can be useful for highlighting pieces of text. This routine
  1362. should be used only for upright text.
  1363.  
  1364. ******************************************************************
  1365. lcrline(lstr, hl, cstr, hc, rstr, hr)
  1366.  
  1367. lcrline() plots three text strings in a single line in page units. The
  1368. string lstr is left justified. The string cstr is centered. The string
  1369. rstr is right justified.
  1370.  
  1371. ******************************************************************
  1372. fntchg(symbol)
  1373.  
  1374. fntchg() allows you to change the active font.
  1375.  
  1376. ******************************************************************
  1377. G_CDECL font(int nfont, ...)
  1378.  
  1379. font() loads the requested fonts. Up to four fonts may be activated at
  1380. once.
  1381.  
  1382. ******************************************************************
  1383. fontfill(fill, fill_pattern, border_color)
  1384.  
  1385. fontfill() allows you to control the appearance fo the filled font
  1386. characters. This class of font can be displayed as an outline font, a
  1387. solid font with no border or a solid font with a border of a different
  1388. color from the body of the character.
  1389.  
  1390. ******************************************************************
  1391. gpcGetCharWidth(font, nchar, width)
  1392.  
  1393. gpcGetCharWidth() retrieves the width of any specified character.
  1394.  
  1395. ******************************************************************
  1396. gpcGetWidestChar(font, nchar, width)
  1397.  
  1398. gpcGetWidestChar() retrieves the widest character in a font and its width.
  1399.  
  1400. ******************************************************************
  1401. setspacing(char_space, font)
  1402.  
  1403. With the use of this function, all characters in the selected font
  1404. will be equally spaced. This allows you to create a table or column
  1405. and have the column entries line up.
  1406.  
  1407. ******************************************************************
  1408. gtext(mode)
  1409.  
  1410. gtext() allows the insertion of text as a string instead of a series of
  1411. strokes into the output file. The PostScript support provides for the
  1412. substitution of a PostScript font for the inserted string.
  1413.  
  1414. ******************************************************************
  1415. GTfont(font_number)
  1416.  
  1417. This call inserts a 4107 escape sequence into the TKF
  1418. file. When the file is converted to PostScript, the chosen font will
  1419. be used for any GrafText strings.
  1420.  
  1421. ******************************************************************
  1422. linesp(ratio)
  1423.  
  1424. linesp() should be used to vary the spacing between your lines
  1425. of text.
  1426.  
  1427. ******************************************************************
  1428. lmargin(inch)
  1429.  
  1430. lmargin() sets the location of the left text margin.
  1431.  
  1432. ******************************************************************
  1433. rmargin(inch)
  1434.  
  1435. rmargin() sets the location of the right text margin.
  1436.  
  1437. ******************************************************************
  1438. trmargin(inch)
  1439.  
  1440. tmargin() sets the location of the top text margin.
  1441.  
  1442. ******************************************************************
  1443. nullsym(symbol)
  1444.  
  1445. nullsym() allows you to specify which character GraphiC will use to print
  1446. the special characters used to indicate superscript, subscript etc.
  1447.  
  1448. ******************************************************************
  1449. pltfnt(x, y, string, height, angle)
  1450.  
  1451. pltfnt() "plots" the character string on your plot at a location which is
  1452. specified in the units of your plot.
  1453.  
  1454. ******************************************************************
  1455. prtfnt(x, y, string, height, angle)
  1456.  
  1457. prtfnt() "prints" the character string on your plot at a location which is
  1458. specified in the inch units.
  1459.  
  1460. ******************************************************************
  1461. putlabel(string, xpos, ypos, height, border, units)
  1462.  
  1463. putlabel() allows you to put a label inside a protected window anywhere on
  1464. the plot. The label string is automatically placed in a close-fitting
  1465. window with the lower left corner of the string at xpos, ypos. Position
  1466. units can be user, inch, or pixel.
  1467.  
  1468. ******************************************************************
  1469. scrht(factor)
  1470.  
  1471. Each level of super- or subscript is made smaller by factor.
  1472.  
  1473. ******************************************************************
  1474. scrshft(shift)
  1475.  
  1476. Each level of super- or subscript is raised or lowered by shift times the
  1477. font height.
  1478.  
  1479. ******************************************************************
  1480. setscale(scflag)
  1481.  
  1482. setscale() allows you to tell GraphiC whether you want font plotting
  1483. routines to scale to the size of your page or to be the exactly as
  1484. specified.
  1485.  
  1486. ******************************************************************
  1487. skew(skewfac)
  1488.  
  1489. skew() sets the fraction of the character height by which the top of the
  1490. character is shifted with respect to the bottom.
  1491.  
  1492. ******************************************************************
  1493. strwidth(string, height)
  1494.  
  1495. strwidth() returns the half-width of the character string.
  1496.  
  1497. ******************************************************************
  1498. subsym(symbol)
  1499.  
  1500. subsym() sets the character which will be used to indicate the start of a
  1501. sup-script.
  1502.  
  1503. ******************************************************************
  1504. supsym(symbol)
  1505.  
  1506. supsym() sets the character which will be used to indicate the start of a
  1507. super-script.
  1508.  
  1509. ******************************************************************
  1510. symoff(on_off)
  1511.  
  1512. symoff() causes all special symbols to be printed.
  1513.  
  1514. ******************************************************************
  1515. tabspace(space)
  1516.  
  1517. tabspace() sets the number of spaces (ASCII 32) to be used by a tab.
  1518.  
  1519. ******************************************************************
  1520. tfont(hwid)
  1521.  
  1522. tfont sets a parameter that specifies the width of lines used to make
  1523. thick fonts.
  1524.  
  1525. ******************************************************************
  1526. widen(widfac)
  1527.  
  1528. widen() is used to change the aspect ratio of a font.
  1529.  
  1530.                     ***** Cross Hairs *****
  1531.  
  1532. The cross-hairs feature lets you do several things
  1533. with your plot after it has been drawn. In cross-hair mode it is possible
  1534. to read point values in inches, user units or pixels, mark point values
  1535. for future use, or draw lines from point to point. You can also follow the
  1536. points along a curve and add annotations to your plot.
  1537.  
  1538. Movement of the cross hairs is controlled by the arrow keys or a supported
  1539. mouse.
  1540.  
  1541. ******************************************************************
  1542. curson(srow, scol, **fx, **fy, *find)
  1543.  
  1544. curson() displays a digital readout on the screen at the location srow,
  1545. scol in an 8 - 10 pixel font. The cross hair is displayed, and all of the
  1546. cursor functions are enabled.
  1547.  
  1548. ******************************************************************
  1549. curvefollow(srow, scol, x, y, npts)
  1550.  
  1551. curvefollow() displays a digital readout on the screen at the location
  1552. srow, scol in an 8 - 10 pixel font and the cross hairs are displayed.
  1553. Using the left and right arrow keys, you can move the cross hairs from
  1554. point to point on the curve given by x and y.
  1555.  
  1556. This mode allows visual selection and readout of the points along the
  1557. curve. In contrast to the curson() functions, the displayed values for x
  1558. and y are taken directly from the input vectors, and hence are not subject
  1559. to the roundoff and discretization errors that occur if the screen point
  1560. is converted to user units.
  1561.  
  1562.                    **** Plot Insertion *****
  1563.  
  1564. ******************************************************************
  1565. insert(readfile, picnum, llx, lly, ysize, irot)
  1566.  
  1567. insert() is a powerful feature allowing you to
  1568. postprocess plots by scaling, shifting, and combining them.
  1569.  
  1570.                    **** Program Timer *****
  1571.  
  1572. ******************************************************************
  1573. set_time(timer)
  1574.  
  1575. set_time() zeros a clock to initiate a timing cycle. Four timers are
  1576. supported and set by the value of timer.
  1577.  
  1578. ******************************************************************
  1579. char *get_time(timer)
  1580.  
  1581. get_time() measures the elapsed time since set_time(timer) was called and
  1582. returns it as a pointer to an internal string.  The format is:
  1583.     hours:minutes:seconds.tenths.
  1584.  
  1585.                 **** Character Input Routines *****
  1586.  
  1587. ******************************************************************
  1588. ciq(void)
  1589.  
  1590. ciq() waits for and returns a standard ASCII character from the keyboard.
  1591.  
  1592. ******************************************************************
  1593. unsigned int cstsq(void)
  1594.  
  1595. cstsq() polls the keyboard input buffer and returns a standard ASCII
  1596. character if one is waiting.
  1597.  
  1598.  
  1599. ******************************************************************
  1600. ci_scq(void)
  1601.  
  1602. ci_scq() returns the scan code of the key in the high byte and the
  1603. character in the low byte. It can be used to read all of the PC keys.
  1604. ci_scq() waits for user input.
  1605.  
  1606. ******************************************************************
  1607. ci_sc1q(void)
  1608.  
  1609. ci_sc1q() returns the scan code of the key in the high byte and the
  1610. character in the low byte. ci_sc1q() returns a 0 if no character is
  1611. available.
  1612.  
  1613.  
  1614.                ***** Character Output Routines *****
  1615.  
  1616. GRAPHICS MODE:
  1617.  
  1618. These routines are used to display text on the graphic screen using
  1619. an 8 - 10 pixel matrix font. The routines are very fast,
  1620. and they put no information into the TKF file. Thus,
  1621. they cannot be printed. Because the font is based on pixels, the size
  1622. of the characters will depend upon the screen resolution.
  1623.  
  1624. ******************************************************************
  1625. putsgq(string, row, col)
  1626.  
  1627. putsgq() puts a string on the graphics screen using a matrix font at the
  1628. location row, col.
  1629.  
  1630. ******************************************************************
  1631. lclrq(row, minl, maxl)
  1632.  
  1633. lclrq() clears the graphics screen according to the arguments specified. A
  1634. row is ten screen pixels high and a column is eight pixels wide.
  1635.  
  1636. TEXT MODE:
  1637.  
  1638. ******************************************************************
  1639. GPC_PUTS(string)
  1640.  
  1641. GPC_PUTS() is a macro that displays strings in text mode in
  1642. both windowed and in non-windowed environments.
  1643.  
  1644.                   **** Statistical Functions *****
  1645.  
  1646. ******************************************************************
  1647. crosscorrelate(x, y, cvec, dim, avg)
  1648.  
  1649. Calculate the cross-correlation function for two functions. If they
  1650. are the same, the auto-correlation function will be calculated. 
  1651.  
  1652. ******************************************************************
  1653. mean(x, xdim)
  1654.  
  1655. mean() returns the average of the vector x.
  1656.  
  1657. ******************************************************************
  1658. median(x, xdim)
  1659.  
  1660. median() returns the median of the vector x. If xdim is odd, the central
  1661. element of the sorted array is returned. Otherwise, the average of the two
  1662. central elements is returned.
  1663.  
  1664. ******************************************************************
  1665. StdDev(x, xdim)
  1666.  
  1667. StdDev() returns the square root of the variance of x.
  1668.  
  1669. ******************************************************************
  1670. variance(x, xdim)
  1671.  
  1672. variance() returns the variance of x incorporating Bessel's correction to
  1673. the standard deviation.
  1674.  
  1675.                      ***** Smoothing *****
  1676.  
  1677. ******************************************************************
  1678. rfit(x, y, npts, nits, sfact, nout, xout, yout)
  1679.  
  1680. rfit() uses weighted linear regression to calculate a smoothed set of
  1681. points to scattered data. A piece-wise linear least square fit is made at
  1682. each point. Spline smoothing is used to fill in extra points.
  1683.  
  1684. ******************************************************************
  1685. smear(minout,nx, ny, insmear)
  1686.  
  1687. smear() smears an input matrix nsmear times.
  1688.  
  1689. ******************************************************************
  1690. spline(x, y, n, n1, s1, s2, xn, yn)
  1691.  
  1692. spline() provides smoothed two-dimensional linear values using a cubic
  1693. spline routine.
  1694.  
  1695. ******************************************************************
  1696. spline3(x, y, z, nx, ny, n1x, n1y, xn, yn, zn)
  1697.  
  1698. spline3() provides smoothed three-dimensional values using a
  1699. cubic spline routine.
  1700.  
  1701.                    **** Matrix Routines *****
  1702.  
  1703. ******************************************************************
  1704. matsolve(coeff, n, vector)
  1705.  
  1706. matsolve() solves simultaneous linear equations where coeff
  1707. is a square matrix. When the routine is called vector points
  1708. the input matrix. On return vector points to the answer matrix.
  1709.  
  1710. ******************************************************************
  1711. matinverse(input, output, n)
  1712.  
  1713. matinverse() loads matrix output with the inverse of matrix input.
  1714.  
  1715.                      **** Panel Filling *****
  1716.  
  1717. GraphiC provides polygon fills using the standard 16 IBM colors plus a
  1718. choice of 16 geometric patterns, 125 dithered patterns, and 248 RGB color
  1719. combinations.
  1720.  
  1721. ******************************************************************
  1722. panel(x, y, nsides, pcolor, border)
  1723.  
  1724. Call panel() to define an area to be filled with color pcolor. Units are
  1725. those of your plot. Multiple calls to panel() may be made to define
  1726. several ploygons of the same color or polygons with holes.
  1727.  
  1728. ******************************************************************
  1729. panelinch(x, y, nsides, pcolor, border)
  1730.  
  1731. panelinch() is like panel() except that the input vectors are in inches.
  1732.  
  1733. ******************************************************************
  1734. panel3d(x, y, z, nsides, pattern, border)
  1735.  
  1736. The panel3d() function allows you to define a panel in 3-D space.
  1737.  
  1738. ******************************************************************
  1739. panproc()
  1740.  
  1741. panproc() process all of the polygons defined in the call(s) to panel?().
  1742. panproc() does the actual filling, and releases the memory that
  1743. has been allocatedand resets all counters.
  1744.  
  1745.                     ***** Memory Routines *****
  1746.  
  1747. GraphiC provides a number of routines to allocate, reallocate and free
  1748. memory that automatically provide the required actions on all the
  1749. platforms supported by GraphiC. In addition, the GraphiC memory routines
  1750. provide valuable debugging options to prevent memory leaks and to check
  1751. boundaries.
  1752.  
  1753. If TESTMEM is defined, GraphiC will keep track of all memory allocated and
  1754. freed using these routines in a linked list. When you call stopplot(),
  1755. this list will be checked and if there is any unfreed memory, a message
  1756. will appear.
  1757.  
  1758. If TESTMEM2 (GraphiC/286 only) is defined, GraphiC will allocate every
  1759. piece of memory in its own selector. Since the allocated memory is just
  1760. long enough to accommodate the request, reading or writing past the end of
  1761. the memory block will generate a protection fault, and the compiler's
  1762. debugger will allow you to locate the error.
  1763.  
  1764. ******************************************************************
  1765. dim2(row, col, size)
  1766.  
  1767. dim2() dynamically allocates 2-D arrays so that they can be quickly
  1768. addressed using array notation. An array of pointers is allocated to point
  1769. to the memory for each row. Then the memory for each row is allocated
  1770. separately. This technique has three major advantages:
  1771.     1) the size of each row can be up to 64<N>kb long.
  1772.     2) the memory allocated for the array need not be contiguous.
  1773.     3) the memory is addressed more quickly.
  1774.  
  1775. ******************************************************************
  1776. free2(mem_ptr)
  1777.  
  1778. free2() frees all of the memory allocated by a call to dim2().
  1779.  
  1780. ******************************************************************
  1781. gpcalloc(nobj, size)
  1782.  
  1783. Allocates a block of memory and zeros the contents.
  1784.  
  1785. ******************************************************************
  1786. gpcfree(mem_ptr)
  1787.  
  1788. Frees a block of memory and sets the pointer to NULL.
  1789.  
  1790. ******************************************************************
  1791. gpcrealloc(mem_ptr, size)
  1792.  
  1793. Reallocates a block of memory and copies the existing contents to the new
  1794. memory block.
  1795.  
  1796. ******************************************************************
  1797. long HowMuchMem()
  1798.  
  1799. HowMuchMem() returns the approximate number of bytes of memory
  1800. currently available.
  1801.  
  1802.                    **** Printer Output *****
  1803.  
  1804. Printer output may be obtained interactively. After the picture is
  1805. drawn there will be a beep, at which time you can enter the appropriate
  1806. response.
  1807.  
  1808. GraphiC can produce color separations suitable for four-color printing.In
  1809. order to support other than the 16 pure colors, it is necessary that
  1810. objects in the separations be printed in shades of gray. Only PostScript
  1811. devices support this capability, so you can produce separations by
  1812. printing to a PostScript printer or converting the output to PostScript.
  1813. Alternatively, GraphiC's support for PostScript Level 2 means that such
  1814. files are importable into desktop publishing packages such as Ventura
  1815. Publisher<191>and they can produce the separations.
  1816.  
  1817. After a plot is drawn, entering an 's' will display a menu that allows you
  1818. to choose primary (red, green, blue) or secondary (cyan, magenta, yellow)
  1819. color schemes. A black separation is also produced. Crop marks are added
  1820. at the corners of the plots to allow the printer to align the four
  1821. pictures for exact color registration. The color of each separation is
  1822. also printed outside of the plot area.
  1823.  
  1824. The following routines allow you to output to the printer from within a
  1825. program.
  1826.  
  1827. ******************************************************************
  1828. hardcopy(type)
  1829.  
  1830. hardcopy() allows GraphiC to make unattended hard copies of
  1831. each GraphiC plot.
  1832.  
  1833. ******************************************************************
  1834. SetDefaultPrinter(int printer_num)
  1835.  
  1836. SetDefaultPrinter() allows you to select an output device from within your
  1837. program without having to use the 'P' option after the plot is complete.
  1838.  
  1839.                     ***** Utility Routines *****
  1840.  
  1841. ******************************************************************
  1842. blank(char attr)
  1843.  
  1844. blank() is used in text mode to erase the screen and set the screen
  1845. attribute to attr.
  1846.  
  1847. ******************************************************************
  1848. gfopen(filename, mode, bigbuff)
  1849.  
  1850. This is our function to open a file and return a file pointer. With this
  1851. function your data files, font files, configuration files, etc can reside
  1852. in any directories specified by the GraphiC environment variable. Multiple
  1853. paths are supported.
  1854.  
  1855. gfopen also uses the standard library function setvbuf() if requested to
  1856. provide buffered file IO.
  1857.  
  1858. ******************************************************************
  1859. intopix(inch)
  1860.  
  1861. intopix() converts a number of inches (or cm) to pixels.
  1862.  
  1863. ******************************************************************
  1864. pixtoin(pix)
  1865.  
  1866. pixtoin() converts a number of pixels to inches (or cm).
  1867.  
  1868. ******************************************************************
  1869. minmax(min, max, x, npts)
  1870.  
  1871. minmax() is provided for your convenience in determining the ranges of
  1872. your variables.
  1873.  
  1874. ******************************************************************
  1875. usertoinch(x_in, y_in, x_inch, y_inch)
  1876.  
  1877. usertoinch() takes an x-y pair in your user units and returns the inch
  1878. values in 8192 space. The function works for linear, log, and polar plots.
  1879. For the latter, x is the input radial coordinate, and y is the input
  1880. angular coordinate. The returned coordinates are in x,y space.
  1881.  
  1882. ******************************************************************
  1883. usertopix(x_in, y_in, z_in, x_pix, y_pix)
  1884.  
  1885. usertopix() takes an x,y pair (2-D plots) or an x,y, z triplet (3-D plots)
  1886. in your user units and returns the pixel values in the 2-D GraphiC pixel
  1887. space. The function works for linear, log, and polar plots. For the
  1888. latter, x is the input radial coordinate, and y is the input angular
  1889. coordinate. The returned coordinates are in x,y space.
  1890.  
  1891. ******************************************************************
  1892. settolerance(tolerance)
  1893.  
  1894. settolerance() is used to eliminate the error "Too few data points. Try a
  1895. coarser grid." when plotting random point contours or surfaces. Use this
  1896. routine with caution. If you make tolerance big enough you will always
  1897. satisfy the algorithm, but the answers may not be reliable.
  1898.